package com.example.springbootlearn.security.service;


import com.example.springbootlearn.security.mapper.MenuMapper;
import com.example.springbootlearn.security.pojo.Menu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuService {

    @Autowired
    private MenuMapper menuMapper;

    public List<Menu> getMenu() {
        return menuMapper.getAllMenu();
    }

    public List<Menu> getAllMenuByUserId(Integer userId) {
        return menuMapper.getAllMenuByUserId(userId);
    }

}
